//
//  GoodDetailModel.m
//  B2C
//
//  Created by xiaowu on 2017/8/4.
//  Copyright © 2017年 lixiaolong. All rights reserved.
//

#import "GoodDetailModel.h"
#import "GoodAttributeModel.h"

@implementation GoodDetailGtotsModel

MJCodingImplementation

@end

@implementation GoodDetailModel

MJCodingImplementation

+ (NSDictionary *)mj_objectClassInArray {
    return @{@"imgs":[ImageUrlModel class],@"attribute":[GoodAttributeModel class], @"goodspricetaid":[GoodsPriceTaidModel class], @"goodsattribute":[GoodsAttributePriceModel class], @"gtots":[GoodDetailGtotsModel class]};
}

- (NSArray *)getImgsUrl {
    
    NSMutableArray *urlArrs = [NSMutableArray array];
    for (ImageUrlModel *model in self.imgs) {
        if (model.imgurl.length > 0) {
            [urlArrs addObject:model.imgurl];
        }
    }
    return urlArrs;
}

- (NSArray *)getGtotsStr {
    NSMutableArray *strArr = [NSMutableArray array];
    for (GoodDetailGtotsModel *gtots in self.gtots) {
        [strArr addObject:gtots.gtname];
    }
    return strArr;
}

@end
